package com.honeywen.mymvc.leetcode;

/**
 * 771. 宝石与石头
 * https://leetcode-cn.com/problems/jewels-and-stones/
 * @author wangwei
 * @date 2019/3/23
 */
public class StoneTest {

    public static int numJewelsInStones(String J, String S) {

        int count = 0;
        for (int i = 0; i < S.length(); i++) {
            for (int j = 0; j < J.length(); j++) {
                if (J.charAt(j) == S.charAt(i)) {
                    count++;
                    break;
                }
            }

        }


        return count;

    }


    public static void main(String[] args) {

        System.out.println(numJewelsInStones("aA", "aAAbbbb"));

    }


}
